package com.ruoyi.training.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.training.mapper.JwMeetingsTrainingMapper;
import com.ruoyi.training.domain.JwMeetingsTraining;
import com.ruoyi.training.service.IJwMeetingsTrainingService;

/**
 * 会议培训情况Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class JwMeetingsTrainingServiceImpl implements IJwMeetingsTrainingService 
{
    @Autowired
    private JwMeetingsTrainingMapper jwMeetingsTrainingMapper;

    /**
     * 查询会议培训情况
     * 
     * @param mtId 会议培训情况主键
     * @return 会议培训情况
     */
    @Override
    public JwMeetingsTraining selectJwMeetingsTrainingByMtId(Long mtId)
    {
        return jwMeetingsTrainingMapper.selectJwMeetingsTrainingByMtId(mtId);
    }

    /**
     * 查询会议培训情况列表
     * 
     * @param jwMeetingsTraining 会议培训情况
     * @return 会议培训情况
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "d")
    public List<JwMeetingsTraining> selectJwMeetingsTrainingList(JwMeetingsTraining jwMeetingsTraining)
    {
        return jwMeetingsTrainingMapper.selectJwMeetingsTrainingList(jwMeetingsTraining);
    }

    /**
     * 新增会议培训情况
     * 
     * @param jwMeetingsTraining 会议培训情况
     * @return 结果
     */
    @Override
    public int insertJwMeetingsTraining(JwMeetingsTraining jwMeetingsTraining)
    {
        return jwMeetingsTrainingMapper.insertJwMeetingsTraining(jwMeetingsTraining);
    }

    /**
     * 修改会议培训情况
     * 
     * @param jwMeetingsTraining 会议培训情况
     * @return 结果
     */
    @Override
    public int updateJwMeetingsTraining(JwMeetingsTraining jwMeetingsTraining)
    {
        jwMeetingsTraining.setUpdateTime(DateUtils.getNowDate());
        return jwMeetingsTrainingMapper.updateJwMeetingsTraining(jwMeetingsTraining);
    }

    /**
     * 批量删除会议培训情况
     * 
     * @param mtIds 需要删除的会议培训情况主键
     * @return 结果
     */
    @Override
    public int deleteJwMeetingsTrainingByMtIds(Long[] mtIds)
    {
        return jwMeetingsTrainingMapper.deleteJwMeetingsTrainingByMtIds(mtIds);
    }

    /**
     * 删除会议培训情况信息
     * 
     * @param mtId 会议培训情况主键
     * @return 结果
     */
    @Override
    public int deleteJwMeetingsTrainingByMtId(Long mtId)
    {
        return jwMeetingsTrainingMapper.deleteJwMeetingsTrainingByMtId(mtId);
    }
}
